﻿Imports Microsoft.VisualBasic
Imports System.ServiceModel
Imports System.Collections.Generic

Namespace DotNetNuke.Modules.IWebCF



    <MessageContract()> _
    Public Class AddFolderRequest
        Inherits IWebCF.IWebRequest

        Private _NewFolderName As String = String.Empty
        Private _ParentFolderId As Integer = -1

        <MessageBodyMember()> _
        Public Property ParentFolderId() As Integer
            Get
                Return _ParentFolderId
            End Get
            Set(ByVal value As Integer)
                _ParentFolderId = value
            End Set
        End Property

        <MessageBodyMember()> _
        Public Property NewFolderName() As String
            Get
                Return _NewFolderName
            End Get
            Set(ByVal value As String)
                _NewFolderName = value
            End Set
        End Property


    End Class

    <MessageContract()> _
    Public Class CopyFileRequest
        Inherits IWebRequest

        Private _SourceFileID As Integer = -1
        Private _TargetFolderId As Integer = -1
        Private _TargetFileName As String = String.Empty
        <MessageBodyMember()> _
        Public Property SourceFileID() As Integer
            Get
                Return _SourceFileID
            End Get
            Set(ByVal value As Integer)
                _SourceFileID = value
            End Set
        End Property
        <MessageBodyMember()> _
        Public Property TargetFileName() As String
            Get
                Return _TargetFileName
            End Get
            Set(ByVal value As String)
                _TargetFileName = value
            End Set
        End Property
        <MessageBodyMember()> _
        Public Property TargetFolderId() As Integer
            Get
                Return _TargetFolderId
            End Get
            Set(ByVal value As Integer)
                _TargetFolderId = value
            End Set
        End Property



    End Class

    <MessageContract()> _
    Public Class FolderIdRequest
        Inherits IWebRequest

        Public Sub New()

        End Sub

        Public Sub New(ByVal header As IWebAuthenticationHeader, ByVal folderId As Integer)
            Me._FolderID = folderId
            Me.Header = header

        End Sub

        Private _FolderID As Integer

        <MessageBodyMember()> _
        Public Property FolderID() As Integer
            Get
                Return Me._FolderID
            End Get
            Set(ByVal value As Integer)
                Me._FolderID = value
            End Set
        End Property

    End Class

    <MessageContract()> _
    Public Class DeleteFilesRequest
        Inherits IWebRequest


        Public Sub New()

        End Sub

        Public Sub New(ByVal header As IWebAuthenticationHeader, ByVal fileIds As IEnumerable(Of Integer))
            Me.Header = header

            Me._FileIds = New List(Of Integer)(fileIds)

        End Sub


        Private _FileIds As New List(Of Integer)

        <MessageBodyMember()> _
        Public Property FileIds() As List(Of Integer)
            Get
                Return _FileIds
            End Get
            Set(ByVal value As List(Of Integer))
                _FileIds = value
            End Set
        End Property


    End Class

    <MessageContract()> _
    Public Class FileIdRequest
        Inherits IWebRequest

        Public Sub New()

        End Sub

        Public Sub New(ByVal header As IWebAuthenticationHeader, ByVal fileId As Integer)
            Me._fileId = fileId
            Me.Header = header


        End Sub

        Private _fileId As Integer

        <MessageBodyMember()> _
        Public Property FileId() As Integer
            Get
                Return _fileId
            End Get
            Set(ByVal value As Integer)
                _fileId = value
            End Set
        End Property


    End Class


    <MessageContract()> _
    Public Class UploadFileRequest
        Inherits IWebRequest

        Private _folderId As Integer
        Private _fileName As String
        Private _content As Byte()




        <MessageBodyMember()> _
        Public Property FileName() As String
            Get
                Return _fileName
            End Get
            Set(ByVal value As String)
                _fileName = value
            End Set
        End Property
        <MessageBodyMember()> _
        Public Property FolderId() As Integer
            Get
                Return _folderId
            End Get
            Set(ByVal value As Integer)
                _folderId = value
            End Set
        End Property

        <MessageBodyMember()> _
        Public Property Content() As Byte()
            Get
                Return _content
            End Get
            Set(ByVal value As Byte())
                _content = value
            End Set
        End Property

    End Class

End Namespace
